package com.cedric.yixianpai.server.Utils;

import java.util.Objects;

public class CardVo implements Cloneable{
    private String title;
    private int lvl;

    public CardVo(String title, int lvl) {
        this.title = title;
        this.lvl = lvl;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getLvl() {
        return lvl;
    }

    public void setLvl(int lvl) {
        this.lvl = lvl;
    }

    @Override
    public String toString() {
        return "CardVo{" +
                "title='" + title + '\'' +
                ", lvl=" + lvl +
                '}';
    }

    @Override
    public Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    @Override
    public boolean equals(Object o){
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CardVo cardVo = (CardVo) o;
        return Objects.equals(title, cardVo.title) &&
                Objects.equals(lvl, cardVo.lvl);
    }

    @Override
    public int hashCode() {
        return Objects.hash(title, lvl);
    }
}
